<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib uri="http://shiro.apache.org/tags" prefix="shiro" %>
<%--
  Created by IntelliJ IDEA.
  User: Z
  Date: 2019/11/18
  Time: 13:49
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>

<%
    //网站域名或ip后面的部分,即项目上下文路径
    String path = request.getContextPath();
//访问基准路径,该页面上的相对路径需要扣上的前缀
    String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!-- 设置基准路径生效 -->
<base href="<%=basePath%>">
<html>
<head>
    <meta charset="utf-8">
    <title>Boss基金估值管理系统</title>
    <link rel="icon" href="static/img/logo.ico">
    <link rel="stylesheet" href="iframe/layui/css/layui.css" media="all"/>
    <link rel="stylesheet" href="static/css/index.css" media="all"/>
    <script src="https://cdn.staticfile.org/jquery/1.10.2/jquery.min.js"></script>
    <script type="text/javascript" src="static/js/index.js"></script>
    <script type="text/javascript" src="iframe/layui/layui.all.js"></script>
</head>
<body class="main_body">
<div class="layui-layout layui-layout-admin">
    <!-- 顶部 -->
    <div class="layui-header header">
        <div class="layui-main mag0">
            <a href="#" class="logo">基金估值系统</a>
            <!-- 显示/隐藏菜单 -->
            <a href="javascript:;" class="seraph hideMenu icon-caidan"></a>
            <!-- 顶级菜单 -->


            <!-- 顶部右侧菜单 -->
            <ul class="layui-nav top_menu">
                <li class="layui-nav-item" pc>
                    <a href="javascript:;" class="clearCache"><i class="layui-icon"
                                                                 data-icon="&#xe667;">&#xe667;</i><cite>消息</cite><span
                            class="layui-badge-dot"></span></a>
                </li>
                <li class="layui-nav-item" pc>
                    <a href="javascript:;" class="clearCache"><i class="layui-icon"
                                                                 data-icon="&#xe640;">&#xe640;</i><cite>清除缓存</cite><span
                            class="layui-badge-dot"></span></a>
                </li>
                <li class="layui-nav-item lockcms" pc>
                    <a href="javascript:;"><i class="seraph icon-lock"></i><cite>锁屏</cite></a>
                </li>
                <li class="layui-nav-item" id="userInfo">
                    <a href="javascript:;"><img src="${user.userPic}" class="layui-nav-img userAvatar" width="35"
                                                height="35"><cite class="adminName">
                    </cite></a>
                    <dl class="layui-nav-child">
                        <dd><a href="javascript:;" data-url="page/user/userInfo.html"><i class="seraph icon-ziliao"
                                                                                         data-icon="icon-ziliao"></i><cite>个人资料</cite></a>
                        </dd>
                        <dd><a href="javascript:;" data-url="page/user/changePwd.html"><i class="seraph icon-xiugai"
                                                                                          data-icon="icon-xiugai"></i><cite>修改密码</cite></a>
                        </dd>
                        <dd><a href="javascript:;" class="showNotice"><i
                                class="layui-icon">&#xe645;</i><cite>系统公告</cite><span
                                class="layui-badge-dot"></span></a></dd>
                        <dd pc><a href="javascript:;" class="functionSetting"><i class="layui-icon">&#xe620;</i><cite>功能设定</cite><span
                                class="layui-badge-dot"></span></a></dd>
                        <dd pc><a href="javascript:;" class="changeSkin"><i
                                class="layui-icon">&#xe61b;</i><cite>更换皮肤</cite></a></dd>
                        <dd><a href="/user/outLongin" class="signOut"><i class="seraph icon-tuichu"></i><cite>退出</cite></a></dd>
                    </dl>
                </li>
            </ul>
        </div>
    </div>
    <!-- 左侧导航 -->
    <div class="layui-side layui-bg-black">
        <div class="user-photo">
            <a class="img" title="我的头像"><img src="${user.userPic}" class="userAvatar"></a>
            <p>
                <shiro:user>
                <label>欢迎[<shiro:principal property="userName"/>]，</label><a style="color: red;" href="/user/outLongin">退出</a>
                </shiro:user>
            </p>
        </div>
        <!-- 搜索 -->
        <div class="layui-form component">
            <select name="search" id="search" lay-search lay-filter="searchPage">
                <option value="">搜索页面或功能</option>
                <option value="1">layer</option>
                <option value="2">form</option>
            </select>
            <i class="layui-icon">&#xe615;</i>
        </div>
        <%-- 左侧导航栏--%>
        <div class="navBar layui-side-scroll" id="navBar">

            <ul id="leftNavBar" class="layui-nav layui-nav-tree layui-bg-cyan layui-inline" lay-filter="demo">
            <%-- 遍历一级菜单--%>
                <c:forEach items="${sys}" var="resource">
                    <%-- 判断一级菜单中是否有 财务管理报表 如果有就给他加上shiro权限标签--%>
                        <shiro:hasAnyRoles name="${resource.role}">
                            <li class='layui-nav-item'>
                                <a href='javascript:;'>
                                  <i class="layui-icon">${resource.resourceName}</i>
                                    <span class='layui-nav-more'></span>
                                </a>
                               <%--遍历所有资源--%>
                                <c:forEach items="${sysAll}" var="resourceAll">
                                <%-- 如果所有资源中 有和当前资源匹配的资源 则将结果输出到页面--%>
                                    <c:if test="${resource.resourceId==resourceAll.parentId}">
                                        <dl class='layui-nav-child'>
                                            <dd><a href='${resourceAll.url}' target="sys"><i class="layui-icon">${resourceAll.resourceName}</i></a></dd>
                                         </dl>
                                    </c:if>
                                </c:forEach>
                            </li>
                        </shiro:hasAnyRoles>
                </c:forEach>
            </ul>

        </div>
    </div>
    <!-
    <!-- 移动导航 -->
    <div class="layui-body layui-form rightBox">
        <div class="layui-tab mag0" lay-filter="bodyTab" id="top_tabs_box">
            <ul class="layui-tab-title top_tab" id="top_tabs">
                <li class="layui-this" lay-id=""><a href="#" target="sys"><i class="layui-icon">&#xe68e;</i></a></li>
            </ul>
            <ul class="layui-nav closeBox">
            <li class="layui-nav-item">
                <i class="layui-icon caozuo">&#xe643;</i> 页面操作
                <dl class="layui-nav-child">
                    <dd><a href="javascript:;" class="refresh refreshThis"><i class="layui-icon">&#x1002;</i>
                        刷新当前</a></dd>
                    <dd><a href="javascript:;" class="closePageOther"><i class="seraph icon-prohibit"></i> 关闭其他</a>
                    </dd>
                    <dd><a href="javascript:;" class="closePageAll"><i class="seraph icon-guanbi"></i> 关闭全部</a></dd>
                </dl>
            </li>
        </ul>

        </div>

        <div class="layui-tab-content clildFrame">
            <div class="layu \i-tab-item layui-show">
                <iframe src="" name="sys"></iframe>
            </div>
        </div>
    </div>
    <!-- 底部 -->
    <div class="layui-footer footer">
        <p><span>专属Boss基金估值系统所有，未经允许请忽转载！！！</span></p>
    </div>
</div>

<div class="site-tree-mobile"><i class="layui-icon">&#xe602;</i></div>
<div class="site-mobile-shade"></div>

</body>
</html>